package com.cjq.service;

import com.cjq.bean.Courier;
import com.cjq.bean.Express;
import com.cjq.dao.Impl.CourierDaoMysql;

import java.util.List;
import java.util.Map;

public class CourierService {
   private static CourierDaoMysql dao = new CourierDaoMysql();

    public static List<Courier> findAll(boolean limit, int offset, int pageNumber) {
        return dao.findAll(limit, offset, pageNumber);
    }

    public static List<Map<String, Integer>> console() {
        return dao.console();
    }


    public static int zongExpress(String sysPhone){
        return dao.zongExpress(sysPhone);
    }

    public static boolean insert(Courier courier){
        return dao.insert(courier);
    }

    public static Courier findBySysPhone(String sysPhone){
        return dao.findBySysPhone(sysPhone);
    }

    public static  boolean update(Courier courier){
        return dao.update(courier);
    }

    public static  boolean updateExpressSysPhone(String sysPhone,String g_sysPhone){
        return dao.updateExpressSysPhone(sysPhone,g_sysPhone);
    }

    public static boolean delete(int id) {
        return dao.delete(id);
    }

    public static boolean updateLoginTime(String phone,String ip){
        return dao.updateLoginTime(phone,ip);
    }


    public static boolean updateJianShuBySysPhone(int jianShu,String sysPhone){
        return dao.updateJianShuBySysPhone(jianShu,sysPhone);
    }
}
